package com.atguigu.eduservice.controller;

import com.atguigu.commonutils.R;
import org.springframework.web.bind.annotation.*;

@CrossOrigin // 解决跨域
@RestController
@RequestMapping("/eduservice/user")
public class EduLoginController {
    // login
    @PostMapping("/login")
    public R login() {
        return R.ok().data("token", "admin");
    }

    // info
    @GetMapping("/info")
    public R info() {
        return R.ok().data("roles", "[admin]").data("name", "admin").data("avatar", "https://ts4.cn.mm.bing.net/th?id=OIP-C.kB-Ovasi0GW67-rmwnAcwAHaEo&w=316&h=197&c=8&rs=1&qlt=90&o=6&dpr=1.25&pid=3.1&rm=2");
    }
}
